home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / casm / au116-as.exe / UTIL / KEY.CPP < prev    next >
C/C++ Source or Header  |  1994-02-26  |  631b  |  35 lines

  1. #include "..\au.hpp"
  2. /*******************************************************************/
  3. void check_for_key()
  4. {
  5.     char opt;
  6.  
  7. around:
  8.     if (kbhit())
  9.     {
  10.         opt=my_getch();
  11.         if (opt==' ')
  12.             goto around;
  13.         for (;;)
  14.         {
  15.             fprintf(stderr, "Continue Y/N:");
  16.             opt = toupper(my_getch());
  17.             fprintf(stderr, "\n");
  18.             if (opt=='N')
  19.                 exit(0);
  20.             else if (opt=='Y')
  21.                 break;
  22.         }
  23.     }
  24. }
  25. /*******************************************************************/
  26. void press_any_key(AU *au)
  27. {
  28.     if (au->pause == ON)
  29.     {
  30.         fprintf(stderr, "Press any key to continue");
  31.         my_getch();
  32.         au_printf(au, "\n\n");
  33.     }
  34. }
  35.